<template>
  <div class="newsinfo">
    <van-panel :title="newsInfo.zhaiyao" :status="`阅读${newsInfo.click}`">
      <div>{{ newsInfo.content }}</div>
    </van-panel>
    <Comment :id="id"></Comment>
  </div>
</template>

<script>
import Comment from '../../../components/Comment'
export default {
  props: ['id'],
  data: () => ({
    newsInfo: {}
  }),
  created() {
    // console.log(this.id);
    this.getNewsInfo()
  },
  methods: {
    async getNewsInfo() {
      const res = await this.$http.getNewsInfo(this.id);
      // console.log(res);
      this.newsInfo = res.data.message;
    }

  },
  components: {
    Comment
  },
 
}
</script>
<style lang="scss">
.newsinfo {
  margin-top: 46px;
  padding: 0 15px;
  .van-cell__title {
    font-size: 14px;
     font-weight: 600;
    flex: 1.5;
  }
  .van-panel__content{
    text-indent: 2em;
    font-size: 12px;
  }

  
}
</style>